package com.jc.ds.model;

/**
 * user_vrt_address
 * @author 
 */
public class UserVrtAddress extends BaseValueObject {
    private Long id;

    private Long userId;

    private String userVrtAddress;

    /**
     * 是否是默认地址
     */
    private String selected;

    /**
     * 地址备注
     */
    private String addressRemark;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserVrtAddress() {
        return userVrtAddress;
    }

    public void setUserVrtAddress(String userVrtAddress) {
        this.userVrtAddress = userVrtAddress;
    }

    public String getSelected() {
        return selected;
    }

    public void setSelected(String selected) {
        this.selected = selected;
    }

    public String getAddressRemark() {
        return addressRemark;
    }

    public void setAddressRemark(String addressRemark) {
        this.addressRemark = addressRemark;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByUserId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_id asc";
            }else{
                this.orderStr = this.orderStr + ",user_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_id desc";
            }else{
                this.orderStr = this.orderStr + ",user_id desc";
            }
        }
    }

    public void orderByUserVrtAddress(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by user_vrt_address asc";
            }else{
                this.orderStr = this.orderStr + ",user_vrt_address asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by user_vrt_address desc";
            }else{
                this.orderStr = this.orderStr + ",user_vrt_address desc";
            }
        }
    }

    public void orderBySelected(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by selected asc";
            }else{
                this.orderStr = this.orderStr + ",selected asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by selected desc";
            }else{
                this.orderStr = this.orderStr + ",selected desc";
            }
        }
    }

    public void orderByAddressRemark(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by address_remark asc";
            }else{
                this.orderStr = this.orderStr + ",address_remark asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by address_remark desc";
            }else{
                this.orderStr = this.orderStr + ",address_remark desc";
            }
        }
    }
}